Conversation
| - Infinite Recursion/Stack Overflow/Stack too deep | ||
| - Tail Recursion | ||
| - Recursion - **The use of a method/application inside itself** | ||
| - Recursive Case - **A problem that is divided into smaller problems** |
There was a problem hiding this comment.
This is not correct.
A recursive case is the case in which the method actually calls itself.
| - Tail Recursion | ||
| - Recursion - **The use of a method/application inside itself** | ||
| - Recursive Case - **A problem that is divided into smaller problems** | ||
| - Base Case - **An immediately solvable problem** |
There was a problem hiding this comment.
i.e. Where the method knows the answer without recursing.
| - Base Case - **An immediately solvable problem** | ||
| - Activation Chain/Stack - **All of the iterations of the method being called within itself** | ||
| - Activation Record/Call - **A single instance/iteration point of the method being called within itself** | ||
| - Infinite Recursion/Stack Overflow/Stack too deep - **An error that occurs when the method results in an infinite loop** |
There was a problem hiding this comment.
I wouldn't say "error". It's a situation where the method results in an excessive use of memory that is usually caused by an infinite loop of sorts with many many calls to the recursive method.
| - What is mystery5("")? | ||
| - What is mystery5("Hi, there!")? | ||
| - What is mystery5("hi")? ** | ||
| - What is mystery5("")? **blank** |
There was a problem hiding this comment.
You should always put things that return a String in double quotes. For this answer, the answer should be "" (empty String) but saying "blank" is confusing.
| - What is mystery6("Hi, there!")? | ||
| - What is mystery6("goodnight moon")? **moon goodnight** | ||
| - What is mystery6("Ada Developers Academy")?**Academy Developers Ada** | ||
| - What is mystery6("Hi, there **there! Hi,** |
There was a problem hiding this comment.
Minor, but notable: there should be a leading space on each of these " moon goodnight", " Academy Developers Ada", " there! Hi,"
Recursion TracingA little feedback, but looks good! |
Recursion Tracing
Thanks for doing some brain yoga. You are now submitting this assignment!
Comprehension Questions